﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admincp/Site.master" AutoEventWireup="true" Inherits="admincp_ImportExportBill" Codebehind="ImportExportBill.aspx.cs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style>
        .layout {
            background:#d32c2c;
        }
        .layout h2 { margin-left: 40px; padding-left: 0.1em; font-size: 2em; line-height: 1em; font-size:40px;
			font-family: Arial, Helvetica, sans-serif;
			color: #504f4f;
			text-shadow: 0px 2px 1px #333;
        }
        .manager {
            clear: both;
            width: 100%;
            margin-left: 10px;
            width:990px;
            padding-bottom:10px;
        }
        footer {
            clear:both;
            text-align:right;
            padding-top:30px;
            padding-bottom:20px;
            background:#0d0d0d;
        }
        .layout a{
            padding-left:20px;color:white;text-decoration:none;
        }
        .layout a:hover{
            padding-left:20px;color:#c2baba;text-decoration:none;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h2>Trang Quản Lý Phiếu Nhập - Phiếu Xuất</h2>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            Đang xử lý dữ liệu...
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:HyperLink ID="hlImportBill" Text="Quản lý phiếu nhập"  runat="server" />&nbsp;
            <asp:HyperLink ID="hlExportBill" Text="Quản lý phiếu xuất"  runat="server" /><br />
            <asp:MultiView ID="MutiView1" ActiveViewIndex="0" runat="server">
                <asp:View ID="View1" runat="server">
                    <div class="manager">
                        <asp:Panel ID="pnImportBill" runat="server" GroupingText="Mục điền thông tin phiếu nhập" ValidationGroup="ImportBill" >
                            <table>
                                <tr>
                                    <td>Nhà cung cấp</td>
                                    <td>
                                        <asp:DropDownList ID="ddlSuppliers" runat="server">
                                            <asp:ListItem>Apple</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>HT Thanh toán</td>
                                    <td>
                                        <asp:DropDownList ID="ddlPayments" runat="server">
                                            <asp:ListItem>Trả sau</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>Nhân viên nhập</td>
                                    <td>
                                        <asp:DropDownList ID="ddlEmployees" runat="server">
                                            <asp:ListItem>Nguyễn Tấn Tài</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Sản Phẩm</td>
                                    <td>
                                        <asp:DropDownList ID="ddlProducts" runat="server">
                                            <asp:ListItem></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>Đơn giá</td>
                                    <td>
                                        <asp:TextBox ID="txtUnitPrice" Width="130" runat="server" />
                                        <asp:RequiredFieldValidator ID="rfvUnitPrice" runat="server" ControlToValidate="txtUnitPrice" Display="Dynamic" ErrorMessage="Đơn giá sản phẩm nhập không được rỗng" SetFocusOnError="True" ValidationGroup="ImportBill">*</asp:RequiredFieldValidator>
                                    </td>
                                    <td>Số lượng</td>
                                    <td><asp:TextBox ID="txtQuantity" Width="130" runat="server" />
                                        <asp:RequiredFieldValidator ID="rfvQuantity" runat="server" ControlToValidate="txtQuantity" Display="Dynamic" ErrorMessage="Số lượng sản phẩm nhập không được rỗng" SetFocusOnError="True" ValidationGroup="ImportBill">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel><br />
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="ImportBill" /><br />
                        Chú ý: Phải nhập đầy đủ thông tin khi đăng ký nhân viên<br />
                        <span class="button-met dark"><asp:Button ID="btnInsert" Text="Thêm Mới" runat="server" CssClass="button" BorderWidth="0px" ValidationGroup="ImportBill" /></span>&nbsp;
                        <span class="button-met dark"><asp:Button ID="btnUpdate" Text="Cập Nhật" runat="server" CssClass="button" BorderWidth="0px" ValidationGroup="ImportBill" /></span>
                        <br />
                        <br />
                        <asp:GridView ID="gvImportBill" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" Width="947px" >
                            <Columns>
                                <asp:BoundField HeaderText="STT" DataField="importbillid" />
                                <asp:BoundField HeaderText="Nhà cung cấp" DataField="supplierid" />
                                <asp:BoundField HeaderText="Tên sản phẩm" DataField="productid" />
                                <asp:BoundField HeaderText="Ngày nhập" DataField="importbilldate" />
                                <asp:BoundField HeaderText="Giá" DataField="unitprice" />
                                <asp:BoundField HeaderText="Số lượng" DataField="quantity" />
                                <asp:BoundField HeaderText="Thành tiền" DataField="totalamount" />
                                <asp:CommandField SelectText="Sửa" ShowSelectButton="True" />
                                <asp:CommandField DeleteText="Xoá" ShowDeleteButton="True" />
                            </Columns>
                            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                            <RowStyle BackColor="White" ForeColor="#330099" VerticalAlign="Top" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                            <SortedAscendingCellStyle BackColor="#FEFCEB" />
                            <SortedAscendingHeaderStyle BackColor="#AF0101" />
                            <SortedDescendingCellStyle BackColor="#F6F0C0" />
                            <SortedDescendingHeaderStyle BackColor="#7E0000" />
                        </asp:GridView>
                    </div>
                </asp:View>
                <asp:View ID="View2" runat="server">
                    <div class="manager">
                        <asp:Panel ID="pnExportBill" runat="server" GroupingText="Mục nhập thông tin phiếu xuất kho" ValidationGroup="ExportBill" >
                            <table>
                                <tr>
                                    <td>HT Thanh Toán</td>
                                    <td>
                                        <asp:DropDownList ID="ddlPayment_ExportBill" runat="server">
                                            <asp:ListItem>Ở Tp.HCM</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>Đơn đặt hàng</td>
                                    <td>
                                        <asp:DropDownList ID="ddlOrder" runat="server">
                                            
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Tên khách hàng</td>
                                    <td>
                                        <asp:TextBox ID="txtCustomerName" Width="130" runat="server" />
                                    </td>
                                    <td>Ngày xuất kho</td>
                                    <td><asp:TextBox ID="txtExportBillDate" Width="130" runat="server" />
                                        <asp:ImageButton ID="Imag1" ImageUrl="~/Image/Calendar_scheduleHS.png" runat="server" AlternateText="Nhấn để hiện lịch" />
                                        <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtExportBillDate" PopupButtonID="Image1"></asp:CalendarExtender>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel><br />
                        <asp:ValidationSummary ID="ValidationSummary2" runat="server"  ValidationGroup="ExportBill"/><br />
                        Chú ý: Phải nhập đầy đủ thông tin cho phiếu nhập<br />
                        <span class="button-met dark"><asp:Button ID="btnInsert2" Text="Thêm Mới" runat="server" CssClass="button" BorderWidth="0px"  ValidationGroup="ExportBill" /></span>&nbsp;
                        <span class="button-met dark"><asp:Button ID="btnUpdate2" Text="Cập Nhật" runat="server" CssClass="button" BorderWidth="0px"  ValidationGroup="ExportBill" /></span>
                        <br />
                        <br />
                        <asp:GridView ID="gvExportBill" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" Width="947px">
                            <Columns>
                                <asp:BoundField HeaderText="STT" DataField="exportbillid" />
                                <asp:BoundField HeaderText="Họ Tên" DataField="customername" />
                                <asp:BoundField HeaderText="Tên ĐN" DataField="username" />
                                <asp:BoundField HeaderText="Mật khẩu" DataField="password" />
                                <asp:CommandField SelectText="Sửa" ShowSelectButton="True" />
                                <asp:CommandField DeleteText="Xoá" ShowDeleteButton="True" />
                            </Columns>
                            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                            <RowStyle BackColor="White" ForeColor="#330099" VerticalAlign="Top" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                            <SortedAscendingCellStyle BackColor="#FEFCEB" />
                            <SortedAscendingHeaderStyle BackColor="#AF0101" />
                            <SortedDescendingCellStyle BackColor="#F6F0C0" />
                            <SortedDescendingHeaderStyle BackColor="#7E0000" />
                        </asp:GridView>
                    </div>
                </asp:View>
            </asp:MultiView>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

